package com.vite.file.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 文件分片信息表，仅在手动分片上传时使用
 * </p>
 *
 * @author json
 * @since 2024-04-15
 */
@Data
@Accessors(chain = true)
@TableName("file_part_detail")
@Schema(description="文件分片信息表，仅在手动分片上传时使用")
public class FilePartDetail  {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @Schema(description = "存储平台")
    @TableField("platform")
    private String platform;

    @Schema(description = "上传ID，仅在手动分片上传时使用")
    @TableField("upload_id")
    private String uploadId;

    @Schema(description = "分片 ETag")
    @TableField("e_tag")
    private String eTag;

    @Schema(description = "分片号。每一个上传的分片都有一个分片号，一般情况下取值范围是1~10000")
    @TableField("part_number")
    private Integer partNumber;

    @Schema(description = "文件大小，单位字节")
    @TableField("part_size")
    private Long partSize;

    @Schema(description = "哈希信息")
    @TableField("hash_info")
    private String hashInfo;

    @Schema(description = "创建时间")
    @TableField("create_time")
    private Date createTime;

    public static final String COL_ID = "id";

    public static final String COL_PLATFORM = "platform";

    public static final String COL_UPLOAD_ID = "upload_id";

    public static final String COL_E_TAG = "e_tag";

    public static final String COL_PART_NUMBER = "part_number";

    public static final String COL_PART_SIZE = "part_size";

    public static final String COL_HASH_INFO = "hash_info";

    public static final String COL_CREATE_TIME = "create_time";

}